#!/bin/sh
 
usage()
{
	echo "0. clean up ./Buildit clean"
	echo "1. build 32bit program ./Buildit i386 [target in i386]"	
	echo "2. build 64bit program ./Buildit x64 [target in x64]"		
	#echo "3. build arm program for GM8126 ./Buildit arm [target in ARM]"
	#echo "4. build arm program for Hisilicon3518 ./Buildit 3518 [target in hisiv100]"
	echo "5. build 64bit program ./Buildit x64_shared [target in x64_shared]"	
}
 
if [ "$*" = "clean" ] ; then
    #make -f nbproject/Makefile-ARM.mk QMAKE= SUBPROJECTS= .clean-conf	
	make -f nbproject/Makefile-i386.mk QMAKE= SUBPROJECTS= .clean-conf
	#make -f nbproject/Makefile-hisiv100.mk QMAKE= SUBPROJECTS= .clean-conf
	make -f nbproject/Makefile-x64.mk QMAKE= SUBPROJECTS= .clean-conf
	make -f nbproject/Makefile-x64_shared.mk QMAKE= SUBPROJECTS= .clean-conf	
elif [ "$*" = "i386" ] ; then
   make -f nbproject/Makefile-i386.mk QMAKE= SUBPROJECTS= .build-conf
#elif [ "$*" = "arm" ] ; then
    #make -f nbproject/Makefile-ARM.mk QMAKE= SUBPROJECTS= .build-conf
#elif [ "$*" = "3518" ] ; then
    #make -f nbproject/Makefile-hisiv100.mk QMAKE= SUBPROJECTS= .build-conf
elif [ "$*" = "x64" ] ; then
    make -f nbproject/Makefile-x64.mk QMAKE= SUBPROJECTS= .build-conf
elif [ "$*" = "x64_shared" ] ; then
    make -f nbproject/Makefile-x64_shared.mk QMAKE= SUBPROJECTS= .build-conf	
else 
	usage;
fi
